import request from '@/utils/request'

/**
 * 获取文章列表
 * @param {number} data.channelId 频道id
 * @param {number} data.timestamp 时间戳
 */
export function getList(data) {
  const { channelId, timestamp } = data
  return request({
    method: 'GET',
    url: '/v1_0/articles',
    params: {
      channel_id: channelId,
      timestamp,
    },
    // 如果加了 showLoading=false，那么默认的加载中就不显示
    showLoading: false,
  })
}
